import originAxios from '@/service'
import { IDataType } from '@/service/type'
// import { IPageSearch, IPageListResult } from './type'

// enum SearchApi {
//   PageListSearch = '/users/list'
// }

export function getPageListData(pageUrl: string, queryInfo: any) {
  return originAxios.post<IDataType<any>>({
    url: pageUrl,
    data: queryInfo
  })
}
export function deletePageData(pageUrl: string) {
  return originAxios.delete<IDataType<any>>({
    url: pageUrl
  })
}
export function createPageData(pageUrl: string, newData: any) {
  return originAxios.post<IDataType<any>>({
    url: pageUrl,
    data: newData
  })
}
export function updatePageData(pageUrl: string, editData: any) {
  return originAxios.patch<IDataType<any>>({
    url: pageUrl,
    data: editData
  })
}
